﻿ 
@{
   
    Education gg = null;

    IList<Education> allGroups = Model.EducationList;
    IList<Education> barGroups = null;
    IList<Education> popListGroups = null;
 
 
}
    <div class="nfTagB nfTagOn">
    <ul>
        @{
                                              
            if (gg != null || Model.IsFriendShip > 0)
            {
            <li isall="1"><a href="#">我的班级</a></li><li class="MIB_line_l">|</li>
            }

            else
            {
            <li isall="1" class="current"><span>我的班级</span></li>
            }

            if (allGroups != null && allGroups.Count > 3)
            {
                barGroups = new List<Education>();
                popListGroups = new List<Education>();
                for (int i = 0; i < allGroups.Count; i++)
                {
                    if (gg != null && allGroups[i].ID == gg.ID && i >= 3)
                    {

                        Education tmp = barGroups[2];

                        barGroups[2] = gg;

                        popListGroups.Insert(0, tmp);
                    }

                    else
                    {

                        if (i < 3)
                        {

                            barGroups.Add(allGroups[i]);

                        }

                        else
                        {

                            popListGroups.Add(allGroups[i]);

                        }

                    }
                }
            }
            else if (allGroups != null && allGroups.Count <= 3)
            {
                barGroups = new List<Education>();
                for (int i = 0; i < allGroups.Count; i++)
                {
                    barGroups.Add(allGroups[i]);
                }
            }
            if (barGroups != null)
            {
                for (int i = 0; i < barGroups.Count; i++)
                {
                    if (gg != null && barGroups[i].ID == gg.ID)
                    {												
            <li gid="@barGroups[i].SchoolClassID" class="current"><span title="@barGroups[i].SchoolClassName" >@barGroups[i].SchoolClassName </span></li>
                    }
                    else
                    {

            <li  gid="@barGroups[i].SchoolClassID"><a title="@barGroups[i].SchoolClassName" href="@("#!" + Utils.AddQueryToUrl(Request.Url.AbsolutePath, "gid", barGroups[i].SchoolClassID.ToString()))">@barGroups[i].SchoolClassName</a></li><li
                class="MIB_line_l">|</li>
                    }
                }
            }
            <li tip="1"><a href="#" class="moreti"><span class="txt">更多</span><span class="more"></span></a>
            </li>
							
        }
    </ul>
    <div class="clear">
    </div>
</div>
